//
//  TMGlobalMacro.h
//  TMGold
//
//  Created by apple on 2017/11/8.
//  Copyright © 2017年 tangmu. All rights reserved.
//

#ifndef TMGlobalMacro_h
#define TMGlobalMacro_h

#define UIColorFromRGBA(v)  [UIColor colorWithRed:((float)((v & 0xFF0000) >> 16))/255.0 green:((float)((v & 0xFF00) >> 8))/255.0  blue:((float)(v & 0xFF))/255.0 alpha:1]
#define SuppressPerformSelectorLeakWarning(Stuff) \
do { \
_Pragma("clang diagnostic push") \
_Pragma("clang diagnostic ignored \"-Warc-performSelector-leaks\"") \
Stuff; \
_Pragma("clang diagnostic pop") \
} while (0)

#define KIsiPhoneX ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(1125, 2436), [[UIScreen mainScreen] currentMode].size) : NO)
#define IOS11  ([UIDevice currentDevice].systemVersion.floatValue >= 11.0)
#define IOS8 ([[[UIDevice currentDevice] systemVersion] doubleValue] >= 8.0)
#define IOS7 [[[UIDevice currentDevice] systemVersion] floatValue] >= 7.0
#define UIScreenWidth [UIScreen mainScreen].bounds.size.width
#define UIScreenHeight [UIScreen mainScreen].bounds.size.height
#define UIScreenFrame  [UIScreen mainScreen].bounds
#define UINavigationBarHeight 0
#define TM_redColor             UIColorFromRGBA(0xf03611)
#define TM_firstTextColor       UIColorFromRGBA(0x333333)
#define TM_secendTextColor      UIColorFromRGBA(0x666666)
#define TM_thirdTextColor       UIColorFromRGBA(0x999999)
#define TM_lineColor            UIColorFromRGBA(0xe0e4e5)
#define TM_backgroundColor      UIColorFromRGBA(0xf1f2f7)
#define TM_orangeColor  UIColorFromRGBA(0xff8700)
#define monthColor  [UIColor colorWithRed:62/255.0 green:130/255.0 blue:277.0/255.0 alpha:1]
#endif /* TMGlobalMacro_h */
